package org.feng.feign;

import org.feng.base.entity.Result;
import org.feng.entity.Role;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author feng
 * @Date 2022/3/8 15:28
 * @Description TODO
 */
@FeignClient(value = "role", fallback  = RoleFallBackHandler.class,contextId="role")
public interface RoleFeign {
    //根据id获取角色
    String GET_ROLE_BY_ID = "get_role_by_id";


    @GetMapping(GET_ROLE_BY_ID)
    Result<Role> getById(@RequestParam("id") Long id);
}
